﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StarryEdge.WPF.Models
{
    public class MenuModel : Prism.Mvvm.BindableBase, IComparable<MenuModel>
    {
        public int Index { get; set; }
        public MaterialDesignThemes.Wpf.PackIconKind PackIcon { get; set; }
        private string _title;

        public string Title
        {
            get { return _title; }
            set { SetProperty(ref _title, value); }
        }
        public bool IsSystem { get; set; }
        public string TitleLang { get; set; }
        public ObservableCollection<MenuItemModel> Childrens { get; set; }

        public int CompareTo(MenuModel? other)
        {
            int result = 0;
            if (Index == other.Index) result = 0;
            if (Index > other.Index) result = 1;
            if (Index < other.Index) result = -1;
            return result;
        }
    }
}
